Plex.Lib.JS.load('UI.Button.Core');

Plex.Lib.CSS.load('UI.Button.Large');

Plex.UI.Button.Large = function()
{
	Plex.S$.extend(this,Plex.UI.Button.Core)

	//Callback
	var self = this;

	//Create
	this.el = {}
	this.el.table=new Element('table',{
		'class':'Large'
	});
	
	this.el.topRow=new Element('tr').injectInside(this.el.table);
	this.el.botRow=new Element('tr').injectInside(this.el.table);
	
	this.el.topCol=new Element('td',{'class':'top'}).injectInside(this.el.topRow);
	this.el.botCol=new Element('td',{'class':'bottom'}).injectInside(this.el.botRow);
	
	this.el.icon = new Element('img',{
		'src':Plex.Com.Image.getURL(0)
	}).injectInside(this.el.topCol);
	
	this.el.body = new Element('div',{
		'class':'text'
	}).injectInside(this.el.botCol)
	
	//Parent Node Callback
	this.el.table.obj=this;
	
	this.setTitle = function(newTitle)
	{
		self.title = newTitle;
		self.el.body.setText(newTitle);
	}
	
	this.setImage = function(imageId)
	{
		this.el.icon.src = Plex.Com.Image.getURL(imageId)
	}
	
	this.moveTo = function(parent)
	{
		self.el.table.injectInside(parent);
	}
		
	this.object = this.el.table;
	
	return this;
}
